const express = require("express");
const app = express();
app.get("/test",(req,res)=>{
    console.log(req.query);
    res.send("中秋节快乐！！");
})

app.get("/lianxi/:id",(req,res)=>{
    console.log(req.params);
    console.log(req.headers);
    res.end("only you!");
})

app.get("/test2",(req,res)=>{
    res.sendFile(__dirname + "/index.html");
})

app.listen(3000,err=>{
    if(!err) console.log('服务器启动成功！！');
    else console.log(err);
})